package jmine.tec.web.wicket.component.menu;

import java.util.List;

import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;

/**
 * @author katsuo.ogawa
 * @date Jul 5, 2011
 */
public class MenuBar extends ListView<MenuItem> {

    /**
     * Construtor.
     * 
     * @param id Id.
     * @param topMenuItems Lista para o menu principal.
     */
    public MenuBar(String id, List<MenuItem> topMenuItems) {
        super(id, topMenuItems);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected void populateItem(ListItem<MenuItem> item) {
        MenuItem menuItem = item.getModelObject();
        item.add(menuItem.getMenuItemPanel());
    }

}
